FROM docker.xxce.cn/openjdk:17
LABEL authors="Xujie"

WORKDIR /app

# 复制构建产物
COPY  /target/eon-mind-user.jar /app/

# 设置环境变量
ENV SERVER_PORT=8099 \
    JVM_OPTS="-Xms1024M -Xmx1024M -Xss256K -XX:MetaspaceSize=256M -XX:MaxMetaspaceSize=256M"

# 暴露端口
EXPOSE ${SERVER_PORT}

# 设置启动命令
CMD java \
    -Dserver.port=${SERVER_PORT} \
    ${JVM_OPTS} \
    -jar eon-mind-user.jar